package cn.getech.data.development.mapper.permission;

import cn.getech.data.development.entity.permission.SysTenantDataPermission;
import cn.getech.data.development.entity.permission.SysTenantDataPermissionExample;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
@Mapper
public interface SysTenantDataPermissionMapper extends BaseMapper<SysTenantDataPermission> {

    List<SysTenantDataPermission> selectByExample(SysTenantDataPermissionExample example);

    int batchInsert(@Param("list") List<SysTenantDataPermission> list);

    int deleteByDataId(@Param("dataId") Integer dataId,@Param("dataType") Integer dataType);

    int insertOrUpdateSelective(SysTenantDataPermission record);

    int updateBatch(List<SysTenantDataPermission> list);

    void insertOrUpdateByQuKey(List<SysTenantDataPermission> initConnects);


    Integer getCreateTenantId(@Param("id") Integer id,@Param("dataType")  Integer dataType);

    List<Integer> getDataIdsTenantId(@Param("tenantId") Integer tenantId,@Param("dataType") Integer dataType);
}